home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_c9.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  22.6 KB  |  828 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_c.h"
  9. /*No:ARRAY[FEATURE_NAME].clear_all*/
  10. /*No:ARRAY[FEATURE_NAME].set_all_with*/
  11. void r855make(T855* C,int a1,int a2){
  12. int _needed=0;
  13. C->_lower=a1;
  14. C->_upper=a2;
  15. _needed=((a2)-(a1))+(1);
  16. /*IF*/if ((_needed)>(0)) {
  17. /*IF*/if (((((T855*)C))->_capacity/*4*/)<(_needed)) {
  18. /*IF*/if (((((T855*)C))->_capacity/*4*/)==(0)) {
  19. C->_storage=calloc(_needed,sizeof(T0*));
  20. }
  21. else {
  22. C->_storage=calloc(_needed,sizeof(T0*));
  23. }
  24. /*FI*/C->_capacity=_needed;
  25. }
  26. else {
  27. /*[IRF3.6clear_all*/{T855* C1=C;
  28. T0* __value=NULL;
  29. /*[IRF3.6set_all_with*/{T855* C2=C1;
  30. T0* c1=__value;
  31. r175set_all_with((((T855*)C2))->_storage/*0*/,c1,((((T855*)C2))->_upper/*8*/)-((((T855*)C2))->_lower/*12*/));
  32. }/*]*/
  33. }/*]*/
  34. }
  35. /*FI*/}
  36. /*FI*/}
  37. T0* r855item(T855* C,int a1){
  38. T0* R=NULL;
  39. R=((((T855*)C))->_storage/*0*/)[(a1)-((((T855*)C))->_lower/*12*/)];
  40. return R;
  41. }
  42. void r855clear(T855* C){
  43. C->_upper=((((T855*)C))->_lower/*12*/)-(1);
  44. }
  45. /*No:ARRAY[FEATURE_NAME].storage*/
  46. T0* r855twin(T855* C){
  47. T0* R=NULL;
  48. R=malloc(sizeof(*C));
  49. *((T855*)R)=M855;
  50. r855copy(((T855*)R),((T0*)C));
  51. return R;
  52. }
  53. /*No:ARRAY[FEATURE_NAME].capacity*/
  54. void r855copy(T855* C,T0* a1){
  55. int _needed_capacity=0;
  56. C->_lower=(((T855*)((T855*)a1)))->_lower/*12*/;
  57. C->_upper=(((T855*)((T855*)a1)))->_upper/*8*/;
  58. _needed_capacity=(((((T855*)C))->_upper/*8*/)-((((T855*)C))->_lower/*12*/))+(1);
  59. /*IF*/if (((((T855*)C))->_capacity/*4*/)<(_needed_capacity)) {
  60. C->_capacity=_needed_capacity;
  61. C->_storage=calloc((((T855*)C))->_capacity/*4*/,sizeof(T0*));
  62. }
  63. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  64. r175copy_from((((T855*)C))->_storage/*0*/,(((T855*)((T855*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  65. }
  66. /*FI*/}
  67. /*No:ARRAY[FEATURE_NAME].lower*/
  68. /*No:ARRAY[FEATURE_NAME].put*/
  69. /*No:ARRAY[FEATURE_NAME].upper*/
  70. int r855count(T855* C){
  71. int R=0;
  72. R=(((((T855*)C))->_upper/*8*/)-((((T855*)C))->_lower/*12*/))+(1);
  73. return R;
  74. }
  75. void r855add_last(T855* C,T0* a1){
  76. int _new_capacity=0;
  77. /*IF*/if (((((T855*)C))->_capacity/*4*/)<((r855count(C))+(1))) {
  78. /*IF*/if (((((T855*)C))->_capacity/*4*/)==(0)) {
  79. C->_capacity=16;
  80. C->_storage=calloc((((T855*)C))->_capacity/*4*/,sizeof(T0*));
  81. }
  82. else {
  83. _new_capacity=(2)*((((T855*)C))->_capacity/*4*/);
  84. C->_storage=r175realloc((((T855*)C))->_storage/*0*/,(((T855*)C))->_capacity/*4*/,_new_capacity);
  85. C->_capacity=_new_capacity;
  86. }
  87. /*FI*/}
  88. /*FI*/C->_upper=((((T855*)C))->_upper/*8*/)+(1);
  89. /*[IRF3.6put*/{T855* C1=C;
  90. T0* b1=a1;
  91. int b2=(((T855*)C))->_upper/*8*/;
  92. ((((T855*)C1))->_storage/*0*/)[(b2)-((((T855*)C1))->_lower/*12*/)]=(b1);
  93. }/*]*/
  94. }
  95. T0* r855first(T855* C){
  96. T0* R=NULL;
  97. R=r855item(C,(((T855*)C))->_lower/*12*/);
  98. return R;
  99. }
  100. /*No:FIXED_ARRAY[RUN_FEATURE_5].clear_all*/
  101. /*No:FIXED_ARRAY[RUN_FEATURE_5].set_all_with*/
  102. void r185make(T185* C,int a1){
  103. /*IF*/if ((a1)==(0)) {
  104. C->_upper=-(1);
  105. }
  106.  else if (((((T185*)C))->_capacity/*8*/)==(0)) {
  107. C->_storage=calloc(a1,sizeof(T0*));
  108. C->_capacity=a1;
  109. C->_upper=(a1)-(1);
  110. }
  111.  else if (((((T185*)C))->_capacity/*8*/)<(a1)) {
  112. C->_storage=calloc(a1,sizeof(T0*));
  113. C->_capacity=a1;
  114. C->_upper=(a1)-(1);
  115. }
  116. else {
  117. C->_upper=(a1)-(1);
  118. /*[IRF3.6clear_all*/{T185* C1=C;
  119. T0* __value=NULL;
  120. /*[IRF3.6set_all_with*/{T185* C2=C1;
  121. T0* c1=__value;
  122. r654set_all_with((((T185*)C2))->_storage/*4*/,c1,(((T185*)C2))->_upper/*12*/);
  123. }/*]*/
  124. }/*]*/
  125. }
  126. /*FI*/}
  127. int r185fast_has(T185* C,T0* a1){
  128. int R=0;
  129. /*IF*/if ((/*(IRF4.6count*/((((T185*)C))->_upper/*12*/)+(1)/*)*/)>(0)) {
  130. R=(r185fast_index_of(C,a1))<=((((T185*)C))->_upper/*12*/);
  131. }
  132. /*FI*/return R;
  133. }
  134. /*No:FIXED_ARRAY[RUN_FEATURE_5].item*/
  135. void r185resize(T185* C,int a1){
  136. T0* _elt_default=NULL;
  137. int _i=0;
  138. int _new_capacity=0;
  139. /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T185*)C))->_upper/*12*/)+(1)/*)*/)) {
  140. C->_upper=(a1)-(1);
  141. }
  142. else {
  143. _new_capacity=a1;
  144. /*IF*/if (((((T185*)C))->_capacity/*8*/)<(_new_capacity)) {
  145. /*IF*/if (((((T185*)C))->_capacity/*8*/)==(0)) {
  146. C->_storage=calloc(_new_capacity,sizeof(T0*));
  147. }
  148. else {
  149. C->_storage=r654realloc((((T185*)C))->_storage/*4*/,(((T185*)C))->_capacity/*8*/,_new_capacity);
  150. }
  151. /*FI*/C->_capacity=_new_capacity;
  152. }
  153. /*FI*/_new_capacity=(((T185*)C))->_upper/*12*/;
  154. C->_upper=(a1)-(1);
  155. _i=(((T185*)C))->_upper/*12*/;
  156. while (!((_i)==(_new_capacity))) {
  157. /*[IRF3.5put*/((((T185*)C))->_storage/*4*/)[_i]=(_elt_default);
  158. /*]*/
  159. _i=(_i)-(1);
  160. }
  161. }
  162. /*FI*/}
  163. /*No:FIXED_ARRAY[RUN_FEATURE_5].storage*/
  164. /*No:FIXED_ARRAY[RUN_FEATURE_5].capacity*/
  165. void r185with_capacity(T185* C,int a1){
  166. /*IF*/if (((((T185*)C))->_capacity/*8*/)<(a1)) {
  167. C->_storage=calloc(a1,sizeof(T0*));
  168. C->_capacity=a1;
  169. }
  170. /*FI*/C->_upper=-(1);
  171. }
  172. int r185fast_index_of(T185* C,T0* a1){
  173. int R=0;
  174. R=r654fast_index_of((((T185*)C))->_storage/*4*/,a1,(((T185*)C))->_upper/*12*/);
  175. return R;
  176. }
  177. /*No:FIXED_ARRAY[RUN_FEATURE_5].put*/
  178. /*No:FIXED_ARRAY[RUN_FEATURE_5].upper*/
  179. /*No:FIXED_ARRAY[RUN_FEATURE_5].count*/
  180. void r185add_last(T185* C,T0* a1){
  181. int _new_capacity=0;
  182. /*IF*/if ((((((T185*)C))->_upper/*12*/)+(1))<=(((((T185*)C))->_capacity/*8*/)-(1))) {
  183. C->_upper=((((T185*)C))->_upper/*12*/)+(1);
  184. }
  185.  else if (((((T185*)C))->_capacity/*8*/)==(0)) {
  186. C->_storage=calloc(2,sizeof(T0*));
  187. C->_capacity=2;
  188. C->_upper=0;
  189. }
  190. else {
  191. _new_capacity=(2)*((((T185*)C))->_capacity/*8*/);
  192. C->_storage=r654realloc((((T185*)C))->_storage/*4*/,(((T185*)C))->_capacity/*8*/,_new_capacity);
  193. C->_capacity=_new_capacity;
  194. C->_upper=((((T185*)C))->_upper/*12*/)+(1);
  195. }
  196. /*FI*//*[IRF3.5put*/((((T185*)C))->_storage/*4*/)[(((T185*)C))->_upper/*12*/]=(a1);
  197. /*]*/
  198. }
  199. void r96clear_all(T96* C){
  200. T0* _value=NULL;
  201. /*[IRF3.6set_all_with*/{T96* C1=C;
  202. T0* b1=_value;
  203. r500set_all_with((((T96*)C1))->_storage/*4*/,b1,((((T96*)C1))->_upper/*12*/)-((((T96*)C1))->_lower/*16*/));
  204. }/*]*/
  205. }
  206. /*No:ARRAY[EXPRESSION].set_all_with*/
  207. void r96make(T96* C,int a1,int a2){
  208. int _needed=0;
  209. C->_lower=a1;
  210. C->_upper=a2;
  211. _needed=((a2)-(a1))+(1);
  212. /*IF*/if ((_needed)>(0)) {
  213. /*IF*/if (((((T96*)C))->_capacity/*8*/)<(_needed)) {
  214. /*IF*/if (((((T96*)C))->_capacity/*8*/)==(0)) {
  215. C->_storage=calloc(_needed,sizeof(T0*));
  216. }
  217. else {
  218. C->_storage=calloc(_needed,sizeof(T0*));
  219. }
  220. /*FI*/C->_capacity=_needed;
  221. }
  222. else {
  223. r96clear_all(C);
  224. }
  225. /*FI*/}
  226. /*FI*/}
  227. T0* r96item(T96* C,int a1){
  228. T0* R=NULL;
  229. R=((((T96*)C))->_storage/*4*/)[(a1)-((((T96*)C))->_lower/*16*/)];
  230. return R;
  231. }
  232. /*No:ARRAY[EXPRESSION].storage*/
  233. T0* r96twin(T96* C){
  234. T0* R=NULL;
  235. R=malloc(sizeof(*C));
  236. *((T96*)R)=M96;
  237. r96copy(((T96*)R),((T0*)C));
  238. return R;
  239. }
  240. /*No:ARRAY[EXPRESSION].capacity*/
  241. void r96copy(T96* C,T0* a1){
  242. int _needed_capacity=0;
  243. C->_lower=/*X96*/((int)(((T96*)((T96*)a1)))->_lower/*16*/);
  244. C->_upper=/*X96*/((int)(((T96*)((T96*)a1)))->_upper/*12*/);
  245. _needed_capacity=(((((T96*)C))->_upper/*12*/)-((((T96*)C))->_lower/*16*/))+(1);
  246. /*IF*/if (((((T96*)C))->_capacity/*8*/)<(_needed_capacity)) {
  247. C->_capacity=_needed_capacity;
  248. C->_storage=calloc((((T96*)C))->_capacity/*8*/,sizeof(T0*));
  249. }
  250. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  251. r500copy_from((((T96*)C))->_storage/*4*/,/*X96*/((T500)(((T96*)((T96*)a1)))->_storage/*4*/),(_needed_capacity)-(1));
  252. }
  253. /*FI*/}
  254. /*No:ARRAY[EXPRESSION].lower*/
  255. /*No:ARRAY[EXPRESSION].put*/
  256. /*No:ARRAY[EXPRESSION].upper*/
  257. int r96count(T96* C){
  258. int R=0;
  259. R=(((((T96*)C))->_upper/*12*/)-((((T96*)C))->_lower/*16*/))+(1);
  260. return R;
  261. }
  262. void r96add_last(T96* C,T0* a1){
  263. int _new_capacity=0;
  264. /*IF*/if (((((T96*)C))->_capacity/*8*/)<((r96count(C))+(1))) {
  265. /*IF*/if (((((T96*)C))->_capacity/*8*/)==(0)) {
  266. C->_capacity=16;
  267. C->_storage=calloc((((T96*)C))->_capacity/*8*/,sizeof(T0*));
  268. }
  269. else {
  270. _new_capacity=(2)*((((T96*)C))->_capacity/*8*/);
  271. C->_storage=r500realloc((((T96*)C))->_storage/*4*/,(((T96*)C))->_capacity/*8*/,_new_capacity);
  272. C->_capacity=_new_capacity;
  273. }
  274. /*FI*/}
  275. /*FI*/C->_upper=((((T96*)C))->_upper/*12*/)+(1);
  276. /*[IRF3.6put*/{T96* C1=C;
  277. T0* b1=a1;
  278. int b2=(((T96*)C))->_upper/*12*/;
  279. ((((T96*)C1))->_storage/*4*/)[(b2)-((((T96*)C1))->_lower/*16*/)]=(b1);
  280. }/*]*/
  281. }
  282. T0* r96first(T96* C){
  283. T0* R=NULL;
  284. R=r96item(C,(((T96*)C))->_lower/*16*/);
  285. return R;
  286. }
  287. T0* r681item(T681* C,int a1){
  288. T0* R=NULL;
  289. R=((((T681*)C))->_storage/*0*/)[(a1)-((((T681*)C))->_lower/*12*/)];
  290. return R;
  291. }
  292. /*No:ARRAY[FORMAL_GENERIC_ARG].storage*/
  293. /*No:ARRAY[FORMAL_GENERIC_ARG].capacity*/
  294. /*No:ARRAY[FORMAL_GENERIC_ARG].lower*/
  295. /*No:ARRAY[FORMAL_GENERIC_ARG].put*/
  296. /*No:ARRAY[FORMAL_GENERIC_ARG].upper*/
  297. int r681count(T681* C){
  298. int R=0;
  299. R=(((((T681*)C))->_upper/*8*/)-((((T681*)C))->_lower/*12*/))+(1);
  300. return R;
  301. }
  302. void r681add_last(T681* C,T0* a1){
  303. int _new_capacity=0;
  304. /*IF*/if (((((T681*)C))->_capacity/*4*/)<((r681count(C))+(1))) {
  305. /*IF*/if (((((T681*)C))->_capacity/*4*/)==(0)) {
  306. C->_capacity=16;
  307. C->_storage=calloc((((T681*)C))->_capacity/*4*/,sizeof(T0*));
  308. }
  309. else {
  310. _new_capacity=(2)*((((T681*)C))->_capacity/*4*/);
  311. C->_storage=r973realloc((((T681*)C))->_storage/*0*/,(((T681*)C))->_capacity/*4*/,_new_capacity);
  312. C->_capacity=_new_capacity;
  313. }
  314. /*FI*/}
  315. /*FI*/C->_upper=((((T681*)C))->_upper/*8*/)+(1);
  316. /*[IRF3.6put*/{T681* C1=C;
  317. T0* b1=a1;
  318. int b2=(((T681*)C))->_upper/*8*/;
  319. ((((T681*)C1))->_storage/*0*/)[(b2)-((((T681*)C1))->_lower/*12*/)]=(b1);
  320. }/*]*/
  321. }
  322. /*No:ARRAY[STRING].clear_all*/
  323. /*No:ARRAY[STRING].set_all_with*/
  324. void r52make(T52* C,int a1,int a2){
  325. int _needed=0;
  326. C->_lower=a1;
  327. C->_upper=a2;
  328. _needed=((a2)-(a1))+(1);
  329. /*IF*/if ((_needed)>(0)) {
  330. /*IF*/if (((((T52*)C))->_capacity/*4*/)<(_needed)) {
  331. /*IF*/if (((((T52*)C))->_capacity/*4*/)==(0)) {
  332. C->_storage=calloc(_needed,sizeof(T0*));
  333. }
  334. else {
  335. C->_storage=calloc(_needed,sizeof(T0*));
  336. }
  337. /*FI*/C->_capacity=_needed;
  338. }
  339. else {
  340. /*[IRF3.6clear_all*/{T52* C1=C;
  341. T0* __value=NULL;
  342. /*[IRF3.6set_all_with*/{T52* C2=C1;
  343. T0* c1=__value;
  344. r400set_all_with((((T52*)C2))->_storage/*0*/,c1,((((T52*)C2))->_upper/*8*/)-((((T52*)C2))->_lower/*12*/));
  345. }/*]*/
  346. }/*]*/
  347. }
  348. /*FI*/}
  349. /*FI*/}
  350. int r52fast_has(T52* C,T0* a1){
  351. int R=0;
  352. /*IF*/if ((r52count(C))>(0)) {
  353. R=(r52fast_index_of(C,a1))<=((((T52*)C))->_upper/*8*/);
  354. }
  355. /*FI*/return R;
  356. }
  357. T0* r52item(T52* C,int a1){
  358. T0* R=NULL;
  359. R=((((T52*)C))->_storage/*0*/)[(a1)-((((T52*)C))->_lower/*12*/)];
  360. return R;
  361. }
  362. void r52resize(T52* C,int a1,int a2){
  363. int _mem=0;
  364. int _up=0;
  365. int _i=0;
  366. T0* _other=NULL;
  367. {T52*n=malloc(sizeof(*n));
  368. *n=M52;
  369. r52make(n,a1,a2);
  370. _other=(T0*)n;
  371. }
  372. _i=r2max((((T52*)C))->_lower/*12*/,(((T52*)((T52*)_other)))->_lower/*12*/);
  373. _up=r2min((((T52*)C))->_upper/*8*/,(((T52*)((T52*)_other)))->_upper/*8*/);
  374. while (!((_i)>(_up))) {
  375. /*[IRF3.6put*/{T52* C1=((T52*)_other);
  376. T0* b1=r52item(C,_i);
  377. int b2=_i;
  378. ((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
  379. }/*]*/
  380. _i=(_i)+(1);
  381. }
  382. *((T52*)(C))=*((T52*)(_other));
  383. }
  384. void r52clear(T52* C){
  385. C->_upper=((((T52*)C))->_lower/*12*/)-(1);
  386. }
  387. /*No:ARRAY[STRING].storage*/
  388. /*No:ARRAY[STRING].capacity*/
  389. int r52has(T52* C,T0* a1){
  390. int R=0;
  391. /*IF*/if ((r52count(C))>(0)) {
  392. R=(r52index_of(C,a1))<=((((T52*)C))->_upper/*8*/);
  393. }
  394. /*FI*/return R;
  395. }
  396. /*No:ARRAY[STRING].lower*/
  397. int r52fast_index_of(T52* C,T0* a1){
  398. int R=0;
  399. R=((((T52*)C))->_lower/*12*/)+(r400fast_index_of((((T52*)C))->_storage/*0*/,a1,((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/)));
  400. return R;
  401. }
  402. /*No:ARRAY[STRING].put*/
  403. /*No:ARRAY[STRING].upper*/
  404. int r52count(T52* C){
  405. int R=0;
  406. R=(((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/))+(1);
  407. return R;
  408. }
  409. void r52add_last(T52* C,T0* a1){
  410. int _new_capacity=0;
  411. /*IF*/if (((((T52*)C))->_capacity/*4*/)<((r52count(C))+(1))) {
  412. /*IF*/if (((((T52*)C))->_capacity/*4*/)==(0)) {
  413. C->_capacity=16;
  414. C->_storage=calloc((((T52*)C))->_capacity/*4*/,sizeof(T0*));
  415. }
  416. else {
  417. _new_capacity=(2)*((((T52*)C))->_capacity/*4*/);
  418. C->_storage=r400realloc((((T52*)C))->_storage/*0*/,(((T52*)C))->_capacity/*4*/,_new_capacity);
  419. C->_capacity=_new_capacity;
  420. }
  421. /*FI*/}
  422. /*FI*/C->_upper=((((T52*)C))->_upper/*8*/)+(1);
  423. /*[IRF3.6put*/{T52* C1=C;
  424. T0* b1=a1;
  425. int b2=(((T52*)C))->_upper/*8*/;
  426. ((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
  427. }/*]*/
  428. }
  429. int r52index_of(T52* C,T0* a1){
  430. int R=0;
  431. R=((((T52*)C))->_lower/*12*/)+(r400index_of((((T52*)C))->_storage/*0*/,a1,((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/)));
  432. return R;
  433. }
  434. /*No:FIXED_ARRAY[RUN_FEATURE_6].clear_all*/
  435. /*No:FIXED_ARRAY[RUN_FEATURE_6].set_all_with*/
  436. void r222make(T222* C,int a1){
  437. /*IF*/if ((a1)==(0)) {
  438. C->_upper=-(1);
  439. }
  440.  else if (((((T222*)C))->_capacity/*8*/)==(0)) {
  441. C->_storage=calloc(a1,sizeof(T0*));
  442. C->_capacity=a1;
  443. C->_upper=(a1)-(1);
  444. }
  445.  else if (((((T222*)C))->_capacity/*8*/)<(a1)) {
  446. C->_storage=calloc(a1,sizeof(T0*));
  447. C->_capacity=a1;
  448. C->_upper=(a1)-(1);
  449. }
  450. else {
  451. C->_upper=(a1)-(1);
  452. /*[IRF3.6clear_all*/{T222* C1=C;
  453. T0* __value=NULL;
  454. /*[IRF3.6set_all_with*/{T222* C2=C1;
  455. T0* c1=__value;
  456. r692set_all_with((((T222*)C2))->_storage/*4*/,c1,(((T222*)C2))->_upper/*12*/);
  457. }/*]*/
  458. }/*]*/
  459. }
  460. /*FI*/}
  461. int r222fast_has(T222* C,T0* a1){
  462. int R=0;
  463. /*IF*/if ((/*(IRF4.6count*/((((T222*)C))->_upper/*12*/)+(1)/*)*/)>(0)) {
  464. R=(r222fast_index_of(C,a1))<=((((T222*)C))->_upper/*12*/);
  465. }
  466. /*FI*/return R;
  467. }
  468. /*No:FIXED_ARRAY[RUN_FEATURE_6].item*/
  469. void r222resize(T222* C,int a1){
  470. T0* _elt_default=NULL;
  471. int _i=0;
  472. int _new_capacity=0;
  473. /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T222*)C))->_upper/*12*/)+(1)/*)*/)) {
  474. C->_upper=(a1)-(1);
  475. }
  476. else {
  477. _new_capacity=a1;
  478. /*IF*/if (((((T222*)C))->_capacity/*8*/)<(_new_capacity)) {
  479. /*IF*/if (((((T222*)C))->_capacity/*8*/)==(0)) {
  480. C->_storage=calloc(_new_capacity,sizeof(T0*));
  481. }
  482. else {
  483. C->_storage=r692realloc((((T222*)C))->_storage/*4*/,(((T222*)C))->_capacity/*8*/,_new_capacity);
  484. }
  485. /*FI*/C->_capacity=_new_capacity;
  486. }
  487. /*FI*/_new_capacity=(((T222*)C))->_upper/*12*/;
  488. C->_upper=(a1)-(1);
  489. _i=(((T222*)C))->_upper/*12*/;
  490. while (!((_i)==(_new_capacity))) {
  491. /*[IRF3.5put*/((((T222*)C))->_storage/*4*/)[_i]=(_elt_default);
  492. /*]*/
  493. _i=(_i)-(1);
  494. }
  495. }
  496. /*FI*/}
  497. /*No:FIXED_ARRAY[RUN_FEATURE_6].storage*/
  498. /*No:FIXED_ARRAY[RUN_FEATURE_6].capacity*/
  499. void r222with_capacity(T222* C,int a1){
  500. /*IF*/if (((((T222*)C))->_capacity/*8*/)<(a1)) {
  501. C->_storage=calloc(a1,sizeof(T0*));
  502. C->_capacity=a1;
  503. }
  504. /*FI*/C->_upper=-(1);
  505. }
  506. int r222fast_index_of(T222* C,T0* a1){
  507. int R=0;
  508. R=r692fast_index_of((((T222*)C))->_storage/*4*/,a1,(((T222*)C))->_upper/*12*/);
  509. return R;
  510. }
  511. /*No:FIXED_ARRAY[RUN_FEATURE_6].put*/
  512. /*No:FIXED_ARRAY[RUN_FEATURE_6].upper*/
  513. void r222add_last(T222* C,T0* a1){
  514. int _new_capacity=0;
  515. /*IF*/if ((((((T222*)C))->_upper/*12*/)+(1))<=(((((T222*)C))->_capacity/*8*/)-(1))) {
  516. C->_upper=((((T222*)C))->_upper/*12*/)+(1);
  517. }
  518.  else if (((((T222*)C))->_capacity/*8*/)==(0)) {
  519. C->_storage=calloc(2,sizeof(T0*));
  520. C->_capacity=2;
  521. C->_upper=0;
  522. }
  523. else {
  524. _new_capacity=(2)*((((T222*)C))->_capacity/*8*/);
  525. C->_storage=r692realloc((((T222*)C))->_storage/*4*/,(((T222*)C))->_capacity/*8*/,_new_capacity);
  526. C->_capacity=_new_capacity;
  527. C->_upper=((((T222*)C))->_upper/*12*/)+(1);
  528. }
  529. /*FI*//*[IRF3.5put*/((((T222*)C))->_storage/*4*/)[(((T222*)C))->_upper/*12*/]=(a1);
  530. /*]*/
  531. }
  532. /*No:FIXED_ARRAY[RUN_FEATURE_6].count*/
  533. int r907fast_has(T907* C,T0* a1){
  534. int R=0;
  535. /*IF*/if ((/*(IRF4.6count*/((((T907*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
  536. R=(r907fast_index_of(C,a1))<=((((T907*)C))->_upper/*8*/);
  537. }
  538. /*FI*/return R;
  539. }
  540. /*No:FIXED_ARRAY[POSITION].item*/
  541. /*No:FIXED_ARRAY[POSITION].clear*/
  542. /*No:FIXED_ARRAY[POSITION].storage*/
  543. /*No:FIXED_ARRAY[POSITION].capacity*/
  544. /*No:FIXED_ARRAY[POSITION].lower*/
  545. void r907with_capacity(T907* C,int a1){
  546. /*IF*/if (((((T907*)C))->_capacity/*4*/)<(a1)) {
  547. C->_storage=calloc(a1,sizeof(T0*));
  548. C->_capacity=a1;
  549. }
  550. /*FI*/C->_upper=-(1);
  551. }
  552. int r907fast_index_of(T907* C,T0* a1){
  553. int R=0;
  554. R=r379fast_index_of((((T907*)C))->_storage/*0*/,a1,(((T907*)C))->_upper/*8*/);
  555. return R;
  556. }
  557. /*No:FIXED_ARRAY[POSITION].put*/
  558. /*No:FIXED_ARRAY[POSITION].upper*/
  559. /*No:FIXED_ARRAY[POSITION].count*/
  560. void r907add_last(T907* C,T0* a1){
  561. int _new_capacity=0;
  562. /*IF*/if ((((((T907*)C))->_upper/*8*/)+(1))<=(((((T907*)C))->_capacity/*4*/)-(1))) {
  563. C->_upper=((((T907*)C))->_upper/*8*/)+(1);
  564. }
  565.  else if (((((T907*)C))->_capacity/*4*/)==(0)) {
  566. C->_storage=calloc(2,sizeof(T0*));
  567. C->_capacity=2;
  568. C->_upper=0;
  569. }
  570. else {
  571. _new_capacity=(2)*((((T907*)C))->_capacity/*4*/);
  572. C->_storage=r379realloc((((T907*)C))->_storage/*0*/,(((T907*)C))->_capacity/*4*/,_new_capacity);
  573. C->_capacity=_new_capacity;
  574. C->_upper=((((T907*)C))->_upper/*8*/)+(1);
  575. }
  576. /*FI*//*[IRF3.5put*/((((T907*)C))->_storage/*0*/)[(((T907*)C))->_upper/*8*/]=(a1);
  577. /*]*/
  578. }
  579. /*No:FIXED_ARRAY[POSITION].first*/
  580. /*No:ARRAY[BASE_CLASS].clear_all*/
  581. /*No:ARRAY[BASE_CLASS].set_all_with*/
  582. void r863make(T863* C,int a1,int a2){
  583. int _needed=0;
  584. C->_lower=a1;
  585. C->_upper=a2;
  586. _needed=((a2)-(a1))+(1);
  587. /*IF*/if ((_needed)>(0)) {
  588. /*IF*/if (((((T863*)C))->_capacity/*4*/)<(_needed)) {
  589. /*IF*/if (((((T863*)C))->_capacity/*4*/)==(0)) {
  590. C->_storage=calloc(_needed,sizeof(T0*));
  591. }
  592. else {
  593. C->_storage=calloc(_needed,sizeof(T0*));
  594. }
  595. /*FI*/C->_capacity=_needed;
  596. }
  597. else {
  598. /*[IRF3.6clear_all*/{T863* C1=C;
  599. T0* __value=NULL;
  600. /*[IRF3.6set_all_with*/{T863* C2=C1;
  601. T0* c1=__value;
  602. r113set_all_with((((T863*)C2))->_storage/*0*/,c1,((((T863*)C2))->_upper/*8*/)-((((T863*)C2))->_lower/*12*/));
  603. }/*]*/
  604. }/*]*/
  605. }
  606. /*FI*/}
  607. /*FI*/}
  608. int r863fast_has(T863* C,T0* a1){
  609. int R=0;
  610. /*IF*/if ((r863count(C))>(0)) {
  611. R=(r863fast_index_of(C,a1))<=((((T863*)C))->_upper/*8*/);
  612. }
  613. /*FI*/return R;
  614. }
  615. T0* r863item(T863* C,int a1){
  616. T0* R=NULL;
  617. R=((((T863*)C))->_storage/*0*/)[(a1)-((((T863*)C))->_lower/*12*/)];
  618. return R;
  619. }
  620. void r863resize(T863* C,int a1,int a2){
  621. int _mem=0;
  622. int _up=0;
  623. int _i=0;
  624. T0* _other=NULL;
  625. {T863*n=malloc(sizeof(*n));
  626. *n=M863;
  627. r863make(n,a1,a2);
  628. _other=(T0*)n;
  629. }
  630. _i=r2max((((T863*)C))->_lower/*12*/,(((T863*)((T863*)_other)))->_lower/*12*/);
  631. _up=r2min((((T863*)C))->_upper/*8*/,(((T863*)((T863*)_other)))->_upper/*8*/);
  632. while (!((_i)>(_up))) {
  633. /*[IRF3.6put*/{T863* C1=((T863*)_other);
  634. T0* b1=r863item(C,_i);
  635. int b2=_i;
  636. ((((T863*)C1))->_storage/*0*/)[(b2)-((((T863*)C1))->_lower/*12*/)]=(b1);
  637. }/*]*/
  638. _i=(_i)+(1);
  639. }
  640. *((T863*)(C))=*((T863*)(_other));
  641. }
  642. void r863clear(T863* C){
  643. C->_upper=((((T863*)C))->_lower/*12*/)-(1);
  644. }
  645. /*No:ARRAY[BASE_CLASS].storage*/
  646. /*No:ARRAY[BASE_CLASS].capacity*/
  647. /*No:ARRAY[BASE_CLASS].lower*/
  648. void r863with_capacity(T863* C,int a1,int a2){
  649. /*IF*/if (((((T863*)C))->_capacity/*4*/)<(a1)) {
  650. C->_storage=calloc(a1,sizeof(T0*));
  651. C->_capacity=a1;
  652. }
  653. /*FI*/C->_lower=a2;
  654. C->_upper=(a2)-(1);
  655. }
  656. int r863fast_index_of(T863* C,T0* a1){
  657. int R=0;
  658. R=((((T863*)C))->_lower/*12*/)+(r113fast_index_of((((T863*)C))->_storage/*0*/,a1,((((T863*)C))->_upper/*8*/)-((((T863*)C))->_lower/*12*/)));
  659. return R;
  660. }
  661. /*No:ARRAY[BASE_CLASS].put*/
  662. /*No:ARRAY[BASE_CLASS].upper*/
  663. int r863count(T863* C){
  664. int R=0;
  665. R=(((((T863*)C))->_upper/*8*/)-((((T863*)C))->_lower/*12*/))+(1);
  666. return R;
  667. }
  668. void r863add_last(T863* C,T0* a1){
  669. int _new_capacity=0;
  670. /*IF*/if (((((T863*)C))->_capacity/*4*/)<((r863count(C))+(1))) {
  671. /*IF*/if (((((T863*)C))->_capacity/*4*/)==(0)) {
  672. C->_capacity=16;
  673. C->_storage=calloc((((T863*)C))->_capacity/*4*/,sizeof(T0*));
  674. }
  675. else {
  676. _new_capacity=(2)*((((T863*)C))->_capacity/*4*/);
  677. C->_storage=r113realloc((((T863*)C))->_storage/*0*/,(((T863*)C))->_capacity/*4*/,_new_capacity);
  678. C->_capacity=_new_capacity;
  679. }
  680. /*FI*/}
  681. /*FI*/C->_upper=((((T863*)C))->_upper/*8*/)+(1);
  682. /*[IRF3.6put*/{T863* C1=C;
  683. T0* b1=a1;
  684. int b2=(((T863*)C))->_upper/*8*/;
  685. ((((T863*)C1))->_storage/*0*/)[(b2)-((((T863*)C1))->_lower/*12*/)]=(b1);
  686. }/*]*/
  687. }
  688. T0* r863first(T863* C){
  689. T0* R=NULL;
  690. R=r863item(C,(((T863*)C))->_lower/*12*/);
  691. return R;
  692. }
  693. /*No:ARRAY[ASSERTION].clear_all*/
  694. /*No:ARRAY[ASSERTION].set_all_with*/
  695. int r608empty(T608* C){
  696. int R=0;
  697. R=(r608count(C))==(0);
  698. return R;
  699. }
  700. void r608make(T608* C,int a1,int a2){
  701. int _needed=0;
  702. C->_lower=a1;
  703. C->_upper=a2;
  704. _needed=((a2)-(a1))+(1);
  705. /*IF*/if ((_needed)>(0)) {
  706. /*IF*/if (((((T608*)C))->_capacity/*4*/)<(_needed)) {
  707. /*IF*/if (((((T608*)C))->_capacity/*4*/)==(0)) {
  708. C->_storage=calloc(_needed,sizeof(T0*));
  709. }
  710. else {
  711. C->_storage=calloc(_needed,sizeof(T0*));
  712. }
  713. /*FI*/C->_capacity=_needed;
  714. }
  715. else {
  716. /*[IRF3.6clear_all*/{T608* C1=C;
  717. T0* __value=NULL;
  718. /*[IRF3.6set_all_with*/{T608* C2=C1;
  719. T0* c1=__value;
  720. r51set_all_with((((T608*)C2))->_storage/*0*/,c1,((((T608*)C2))->_upper/*8*/)-((((T608*)C2))->_lower/*12*/));
  721. }/*]*/
  722. }/*]*/
  723. }
  724. /*FI*/}
  725. /*FI*/}
  726. int r608fast_has(T608* C,T0* a1){
  727. int R=0;
  728. /*IF*/if ((r608count(C))>(0)) {
  729. R=(r608fast_index_of(C,a1))<=((((T608*)C))->_upper/*8*/);
  730. }
  731. /*FI*/return R;
  732. }
  733. T0* r608item(T608* C,int a1){
  734. T0* R=NULL;
  735. R=((((T608*)C))->_storage/*0*/)[(a1)-((((T608*)C))->_lower/*12*/)];
  736. return R;
  737. }
  738. void r608clear(T608* C){
  739. C->_upper=((((T608*)C))->_lower/*12*/)-(1);
  740. }
  741. /*No:ARRAY[ASSERTION].storage*/
  742. T0* r608twin(T608* C){
  743. T0* R=NULL;
  744. R=malloc(sizeof(*C));
  745. *((T608*)R)=M608;
  746. r608copy(((T608*)R),((T0*)C));
  747. return R;
  748. }
  749. /*No:ARRAY[ASSERTION].capacity*/
  750. void r608copy(T608* C,T0* a1){
  751. int _needed_capacity=0;
  752. C->_lower=(((T608*)((T608*)a1)))->_lower/*12*/;
  753. C->_upper=(((T608*)((T608*)a1)))->_upper/*8*/;
  754. _needed_capacity=(((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/))+(1);
  755. /*IF*/if (((((T608*)C))->_capacity/*4*/)<(_needed_capacity)) {
  756. C->_capacity=_needed_capacity;
  757. C->_storage=calloc((((T608*)C))->_capacity/*4*/,sizeof(T0*));
  758. }
  759. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  760. r51copy_from((((T608*)C))->_storage/*0*/,(((T608*)((T608*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  761. }
  762. /*FI*/}
  763. /*No:ARRAY[ASSERTION].lower*/
  764. int r608fast_index_of(T608* C,T0* a1){
  765. int R=0;
  766. R=((((T608*)C))->_lower/*12*/)+(r51fast_index_of((((T608*)C))->_storage/*0*/,a1,((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/)));
  767. return R;
  768. }
  769. /*No:ARRAY[ASSERTION].put*/
  770. /*No:ARRAY[ASSERTION].upper*/
  771. int r608count(T608* C){
  772. int R=0;
  773. R=(((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/))+(1);
  774. return R;
  775. }
  776. void r608add_last(T608* C,T0* a1){
  777. int _new_capacity=0;
  778. /*IF*/if (((((T608*)C))->_capacity/*4*/)<((r608count(C))+(1))) {
  779. /*IF*/if (((((T608*)C))->_capacity/*4*/)==(0)) {
  780. C->_capacity=16;
  781. C->_storage=calloc((((T608*)C))->_capacity/*4*/,sizeof(T0*));
  782. }
  783. else {
  784. _new_capacity=(2)*((((T608*)C))->_capacity/*4*/);
  785. C->_storage=r51realloc((((T608*)C))->_storage/*0*/,(((T608*)C))->_capacity/*4*/,_new_capacity);
  786. C->_capacity=_new_capacity;
  787. }
  788. /*FI*/}
  789. /*FI*/C->_upper=((((T608*)C))->_upper/*8*/)+(1);
  790. /*[IRF3.6put*/{T608* C1=C;
  791. T0* b1=a1;
  792. int b2=(((T608*)C))->_upper/*8*/;
  793. ((((T608*)C1))->_storage/*0*/)[(b2)-((((T608*)C1))->_lower/*12*/)]=(b1);
  794. }/*]*/
  795. }
  796. /*No:FIXED_ARRAY[FEATURE_NAME].item*/
  797. /*No:FIXED_ARRAY[FEATURE_NAME].storage*/
  798. /*No:FIXED_ARRAY[FEATURE_NAME].capacity*/
  799. void r719with_capacity(T719* C,int a1){
  800. /*IF*/if (((((T719*)C))->_capacity/*4*/)<(a1)) {
  801. C->_storage=calloc(a1,sizeof(T0*));
  802. C->_capacity=a1;
  803. }
  804. /*FI*/C->_upper=-(1);
  805. }
  806. /*No:FIXED_ARRAY[FEATURE_NAME].put*/
  807. /*No:FIXED_ARRAY[FEATURE_NAME].upper*/
  808. void r719add_last(T719* C,T0* a1){
  809. int _new_capacity=0;
  810. /*IF*/if ((((((T719*)C))->_upper/*8*/)+(1))<=(((((T719*)C))->_capacity/*4*/)-(1))) {
  811. C->_upper=((((T719*)C))->_upper/*8*/)+(1);
  812. }
  813.  else if (((((T719*)C))->_capacity/*4*/)==(0)) {
  814. C->_storage=calloc(2,sizeof(T0*));
  815. C->_capacity=2;
  816. C->_upper=0;
  817. }
  818. else {
  819. _new_capacity=(2)*((((T719*)C))->_capacity/*4*/);
  820. C->_storage=r175realloc((((T719*)C))->_storage/*0*/,(((T719*)C))->_capacity/*4*/,_new_capacity);
  821. C->_capacity=_new_capacity;
  822. C->_upper=((((T719*)C))->_upper/*8*/)+(1);
  823. }
  824. /*FI*//*[IRF3.5put*/((((T719*)C))->_storage/*0*/)[(((T719*)C))->_upper/*8*/]=(a1);
  825. /*]*/
  826. }
  827.  
  828.